package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.tenant.Converter.CustomStringConverter;
import com.example.tenant.Converter.LongStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @program: waterx
 * @description: 角色组实体类
 * @author: qinghuan
 * @create: 2024-10-09 09:01
 **/


@Data
@ColumnWidth(10)
@EqualsAndHashCode(callSuper = true)
@TableName("sys_r_group")
public class SysRoleGroup extends Model<SysRoleGroup> {
    private static final long serialVersionUID = 1L;

    /**
     * 角色组主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ExcelProperty("id")
    private String id;

    /**
     * 角色组名称
     */
    @ExcelProperty("group_name")
    private String groupName;

    /**
     * 角色组状态，0 启用，1 禁用
     */
    @ExcelProperty("status")
    private String status;

    /**
     * 角色组描述
     */
    @ExcelProperty("description")
    private String description;

    /**
     * 创建人
     */
    @ExcelProperty(value = "create_by", converter = CustomStringConverter.class)
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelProperty("create_time")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value = "update_by", converter = CustomStringConverter.class)
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty("update_time")
    private Date updateTime;

    /**
     * 删除标记
     */
    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty("del_flag")
    private String delFlag;

    /**
     * 租户id
     */
    @ExcelProperty(value = "tenant_id", converter = LongStringConverter.class)
    private Long tenantId;
}
